#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from tortoise import fields

from app.base.base_model import (
    BaseModel, BaseCreatedUpdatedModel
)
from common.enums import MethodType

class Api(BaseModel, BaseCreatedUpdatedModel):
    path        = fields.CharField(max_length=100, description="API路径")
    method      = fields.CharEnumField(MethodType, description="请求方法")
    summary     = fields.CharField(default = '', max_length=255, description="请求简介")
    tags        = fields.CharField(default = '', max_length=100, description="API标签")
    
    class Meta:
        table = 'api'